﻿<BadHabit_Factory_Controls:GenericPanel
    x:Class="BadHabit.Factory.Controls.ReportsPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:BadHabit_Factory_Controls="clr-namespace:BadHabit.Factory.Controls"
    xmlns:BadHabit_WPFTools="clr-namespace:BadHabit.WPFTools;assembly=BadHabit.WPFTools"                
    
    
    xmlns:props="clr-namespace:BadHabit.Factory.Windows.Properties"
    
    Focusable="True"
    
    DataContextChanged="ReportPanel_DataContextChanged"
    
    HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch"
    MinWidth="400"
    MinHeight="400"    
    Loaded="ReportPanel_Loaded"      
    x:Name="ReportPanel">

    <BadHabit_Factory_Controls:GenericPanel.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Save" CanExecute="Save_CanExecute" Executed="Save_Executed"/>
    </BadHabit_Factory_Controls:GenericPanel.CommandBindings>



    <Grid x:Name="ContentPanel" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <!-- TOOL BAR -->
    <DockPanel Grid.Row="0" Grid.ColumnSpan="2">
            <ToolBar x:Name="Toolbar" DockPanel.Dock="Left" ToolBarTray.IsLocked="True" Height="60" >
        
            <Menu>
                <MenuItem                       
                    Style="{StaticResource ToolBarMenuItem}"
                    x:Name="exportButton"                     
                    Header="{x:Static props:Resources.Export}"                                        
                    Click="exportButton_Click">
                    <MenuItem.Icon>
                        <Image Source="/Images/ToolBar/Export.png" Stretch="Uniform" Width="32" Height="32"/>
                    </MenuItem.Icon>
                </MenuItem>

                <MenuItem                       
                    Style="{StaticResource ToolBarMenuItem}"                    
                    Header="{x:Static props:Resources.Print}"                                       
                    Click="Print_Click">
                    <MenuItem.Icon>
                        <Image Source="/Images/ToolBar/Printer.png" Stretch="Uniform" Width="32" Height="32"/>
                    </MenuItem.Icon>
                </MenuItem>
            </Menu>

          
                                       

        </ToolBar>
        <Button
                        x:Name="commitButton"
                        DockPanel.Dock="Right"
                        Style="{StaticResource CommitButton}"
                        Command="ApplicationCommands.Save"
                        HorizontalAlignment="Right" 
                        Margin="5" />
        </DockPanel>
        
        <StackPanel Orientation="Vertical" Grid.Column="0" Grid.Row="1">
            
            <WrapPanel  Margin="0,10,0,2">
                <Image Source="/Images/ToolBar/FullBacklog.png" Stretch="Uniform" Width="16" Height="16"/>
                <TextBlock Style="{StaticResource Label}" Text="{x:Static props:Resources.Backlog_Reports}" Margin="5,0,0,0" VerticalAlignment="Bottom"/>    
            </WrapPanel>            
            <ListBox x:Name="reportBacklogListBox"
                     Margin="15,0,0,0"
                     BorderThickness="0"                                
                     HorizontalContentAlignment="Stretch"                     
                     SelectionChanged="reportTypeListBox_SelectionChanged"
                     Background="Transparent"/>

            <WrapPanel Margin="0,10,0,2">
                <Image Source="/Images/ToolBar/ProjectBurnDown.png" Stretch="Uniform" Width="16" Height="16"/>
                <TextBlock Style="{StaticResource Label}" Text="{x:Static props:Resources.Effort_Reports}" Margin="5,0,0,0"/>
            </WrapPanel>
            <ListBox x:Name="reportMonitoringListBox"
                     Margin="15,0,0,0"
                     BorderThickness="0"
                     HorizontalContentAlignment="Stretch"                     
                     SelectionChanged="reportTypeListBox_SelectionChanged"
                     Background="Transparent"/>
            
            <WrapPanel Margin="0,10,0,2">
                <Image Source="/Images/Icons/tail.png" Stretch="Uniform" Width="16" Height="16"/>
                <TextBlock Style="{StaticResource Label}" Text="{x:Static props:Resources.Tail_Reports}" Margin="5,0,0,0"/>
            </WrapPanel>
            <ListBox x:Name="reportTailListBox"
                     Margin="15,0,0,0"
                     BorderThickness="0"                     
                     HorizontalContentAlignment="Stretch"                     
                     SelectionChanged="reportTypeListBox_SelectionChanged"
                     Background="Transparent"/>

        </StackPanel>
        
        

        <Border
                Grid.Row="1"
                Grid.Column="1"
                Margin="3,0,0,0"
                Style="{StaticResource RoundBorder}">
            
         
            
            <FlowDocumentReader
                x:Name="flowDocumentViewer"
                
                ViewingMode="Scroll"
                
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                Margin="10,10,10,10"
                MinZoom="50"                
                Zoom="100"
                MaxZoom="300"               
                />
            
        </Border>

        
    </Grid>
        
        
        
</BadHabit_Factory_Controls:GenericPanel>
